//
//  PhotoTableViewCell.m
//  SsehMaster
//
//  Created by 杨阳 on 2018/8/9.
//  Copyright © 2018年 yinlong. All rights reserved.
//

#import "PhotoTableViewCell.h"
#import <UIImageView+WebCache.h>

@interface PhotoTableViewCell()


@property (weak, nonatomic) IBOutlet UIImageView *phontoImage0;

@property (weak, nonatomic) IBOutlet UIImageView *phontoImage1;

@property (weak, nonatomic) IBOutlet UIImageView *phontoImage2;

@property (weak, nonatomic) IBOutlet UIImageView *phontoImage3;

@end

@implementation PhotoTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)configImage:(NSString *)imageStr{
    
    NSArray * imageUrlArr = [imageStr componentsSeparatedByString:@","];
    if (kArrayIsEmpty(imageUrlArr)) {
        return;
    }
    for (NSInteger i = 0 ; i < imageUrlArr.count; i++) {
        NSString * imageStr = [NSString stringWithFormat:@"%@",imageUrlArr[i]];
        NSString * urlStr = [NSString stringWithFormat:@"%@%@",kSsehImageIP,imageStr];
        switch (i) {
            case 0:
                [self.phontoImage0 sd_setImageWithURL:[NSURL URLWithString:urlStr] placeholderImage:[UIImage imageNamed:@"ssehLogo"]];
                break;
            case 1:
                [self.phontoImage1 sd_setImageWithURL:[NSURL URLWithString:urlStr]];
                break;
            case 2:
                [self.phontoImage2 sd_setImageWithURL:[NSURL URLWithString:urlStr]];
                break;
            case 3:
                [self.phontoImage3 sd_setImageWithURL:[NSURL URLWithString:urlStr]];
                break;
                
            default:
                break;
        }
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
